package com.fan.admin.service.impl;

import com.fan.admin.dao.StudentMapper;
import com.fan.admin.service.StudentService;
import com.fan.commons.pojo.Course;
import com.fan.commons.pojo.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author fan
 * @date 2021/2/27
 */
@Service
public class StudentServiceImpl implements StudentService {


	@Autowired
	private StudentMapper studentMapper;

	@Override
	public int insertStudent(Student student) {
		return studentMapper.insertStudent(student);
	}

	@Override
	public Student queryStudentById(Integer id) {
		return studentMapper.queryStudentById(id);
	}

	@Override
	public Student queryStudentByStudentId(String studentId) {
		return studentMapper.queryStudentByStudentId(studentId);
	}


	@Override
	public List<Student> queryStudent(Student student) {
		return studentMapper.queryStudent(student);
	}

	@Override
	public List<Course> studentScore(String studentId) {
		return studentMapper.studentScore(studentId);
	}

	@Override
	public int updateStudent(Student student) {
		return studentMapper.updateStudent(student);
	}

	@Override
	public int deleteStudent(Integer id) {
		return studentMapper.deleteStudent(id);
	}

	@Override
	public String getStudentId(String claId) {
		return studentMapper.getStudentId(claId);
	}
}
